package org.snail.admin.backend.service.impl;

import org.snail.admin.backend.dao.UserMapper;
import org.snail.admin.backend.entity.UserEntity;
import org.snail.admin.backend.service.UserService;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements UserService {

    private final UserMapper userMapper;

    UserServiceImpl(UserMapper userMapper) {
        this.userMapper = userMapper;
    }


    public UserEntity findById(Long id) {
        return userMapper.findById(id);
    }

    public UserEntity findByName(String name) {
        return userMapper.findByName(name);
    }
}
